package com.zzy.librarytest.service.impl;

import com.zzy.librarytest.dao.BookDao;
import com.zzy.librarytest.entity.Book;
import com.zzy.librarytest.service.BookServvice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BookServviceImpl implements BookServvice {
    @Autowired
    private BookDao bookDao;
    @Override
    public List<Book> selectAllBook() {
        return bookDao.selectAllBook();

    }

    @Override
    public Integer saveBook(Book book) {
        return bookDao.saveBook(book);
    }

    @Override
    public Book selectBook(Integer id) {
        return bookDao.selectBook(id);
    }

    @Override
    public Integer updateBook(Book book) {
        return bookDao.updateBook(book);
    }

    @Override
    public Integer deleteBook(Integer id) {
        return bookDao.deleteBook(id);
    }
}
